#include<iostream>
#include<algorithm>
#include<string>
#include<vector>

using namespace std;

int main()
{
    string s;
    getline(cin, s);
    int res = 0;
    s += " ";
    string temp = "";
    vector<string> strs;
    for (int i = 0;i < s.size();i++)
    {
        if (s[i] == '"')
        {
            i++;
            while (s[i] != '"')
            {
                temp += s[i];
                i++;
            }
            res++;
            strs.push_back(temp);
            temp.clear();
        }
        else if (s[i] == ' ')
        {
            if (!temp.empty())
            {
                res++;
                strs.push_back(temp);
                temp.clear();
            }
        }
        else
        {
            temp += s[i];
        }
    }
    cout << res << endl;
    for (auto str : strs)
    {
        cout << str << endl;
    }
    return 0;
}